/*
 * Copyright (c) 2016 Breezee.org. All Rights Reserved.
 */

package com.oj.common.event;

import com.oj.common.constants.ConstantEnum;

/**
 * 事件状态
 * <p>
 * Created by Silence on 2016/4/28.
 */
public enum ListenerStatus implements ConstantEnum {

    INIT("init", 0),

    ACCEPT("accept", 1),

    NOTACCEPT("not accept", 2),

    HANDLE("hanle", 3),

    EXCEPTION("exception", 4),

    COMPLETE("complete", 5);


    private final String text;

    private final Integer value;

    ListenerStatus(String text, Integer value) {
        this.text = text;
        this.value = value;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String getText() {
        return this.text;
    }

    @Override
    public String toString() {
        return this.getValue() + ":" + this.getText();
    }
}
